<template>
	<div>
		<!-- 模态框 -->
		<div>
			<div class="md-modal modal-msg md-modal-transition" :class="{'md-show': mdShow}">
				<div class="md-modal-inner">
					<div class="md-top">
						<button class="md-close" @click="closeModal">关闭</button>
					</div>
					<div class="md-content">
						<div class="confirm-tips">
							<!-- <p slot="message">你确认要删除此条数据吗?</p> -->
							<slot name="message"></slot>
						</div>
						<div class="btn-wrap">
							<slot name="buttonBar"></slot>
						</div>
					</div>
				</div>
			</div>
			<div class="md-overlay" v-show="mdShow" @click="closeModal"></div>
		</div>
	</div>
</template>

<script>
// modal模态框
export default {
  name: 'modal',
  props: {
		'mdShow': Boolean
  },
	methods: {
		closeModal() {
			// 只能使用一次
			// this.mdShow = false
			this.$emit('close')
		}
	}
}
</script>
